package com.wry.wallet.utils;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * <h1> 统一返回 </h1>
 *
 * @author wry
 * @since 2023.03.31
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ApiResult<T> implements Serializable {

    private Integer code;

    private String msg;

    private T data;

    public static <T>ApiResult<T> success(T data){
        return new ApiResult<>(200,"ok",data);
    }

}
